package com.whfc.fse.dto;

import com.whfc.fse.constant.GantryMeasurement;
import lombok.Data;
import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.io.Serializable;
import java.time.Instant;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * 龙门吊硬件数据
 */
@Data
@Measurement(name = GantryMeasurement.MEASUREMENT, database = GantryMeasurement.DATABASE, retentionPolicy = GantryMeasurement.RETENTION_POLICY, timeUnit = TimeUnit.SECONDS)
public class FseGantryDataLogDTO implements Serializable {

    /**
     * 硬件时间
     */
    private Date time;

    /**
     * 服务器时间
     */
    private Date createTime;

    /**
     * 硬件时间
     */
    @Column(name = "time")
    private Instant deviceTime;

    /**
     * 服务器时间
     */
    @Column(name = "serverTime")
    private Long serverTime;

    /**
     * 龙门吊id
     */
    @Column(name = "gantryId")
    private String gantryId;

    /**
     * 刚腿位移（米）
     */
    @Column(name = "rigidLegShift")
    private Double rigidLegShift;

    /**
     * 柔腿位移（米）
     */
    @Column(name = "softLegShift")
    private Double softLegShift;

    /**
     * 位移（米）
     */
    @Column(name = "shift")
    private Double shift;

    /**
     * 风速（m/s）
     */
    @Column(name = "windSpeed")
    private Double windSpeed;

    /**
     * 运行偏斜（米）
     */
    @Column(name = "runningTurn")
    private Double runningTurn;

    /**
     * 主钩起升高度（米）
     */
    @Column(name = "mainHookLiftHeight")
    private Double mainHookLiftHeight;

    /**
     * 副钩起升高度（米）
     */
    @Column(name = "subHookLiftHeight")
    private Double subHookLiftHeight;

    /**
     * 主钩起升重量（吨）
     */
    @Column(name = "mainHookLiftWeight")
    private Double mainHookLiftWeight;

    /**
     * 副钩起升重量（吨）
     */
    @Column(name = "subHookLiftWeight")
    private Double subHookLiftWeight;

    /**
     * 主起升超载状态 0-正常，1-预警
     */
    @Column(name = "mainHookWarn")
    private Integer mainHookWarn;


    /**
     * 副起升超载状态 0-正常，1-预警
     */
    @Column(name = "subHookWarn")
    private Integer subHookWarn;

    /**
     * 主起升超载次数
     */
    @Column(name = "mainHookWarnNum")
    private Integer mainHookWarnNum;

    /**
     * 主起当前升超载次数
     */
    @Column(name = "mainHookTimeWarnNum")
    private Integer mainHookTimeWarnNum;

    /**
     * 副起升超载次数
     */
    @Column(name = "subHookWarnNum")
    private Integer subHookWarnNum;

    /**
     * 副起升当前超载次数
     */
    @Column(name = "subHookTimeWarnNum")
    private Integer subHookTimeWarnNum;

    /**
     * 风速报警次数
     */
    @Column(name = "windWarnNum")
    private Integer windWarnNum;

    /**
     * 风速当前报警次数
     */
    @Column(name = "windTimeWarnNum")
    private Integer windTimeWarnNum;

    /**
     * 删除标记(0-未删除 1-已删除)
     */
    @Column(name = "delFlag")
    private Integer delFlag;
}